package com.market.bean.common;

import lombok.Data;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * @author fan
 * @Description:
 * @since 2022/12/30 17:22
 */
@Data
public class BaseStatVo<T>{
    private List<String> columns;
    private List<T> rows;

    public <T> BaseStatVo(T t) {
        Field[] declaredFields = t.getClass().getDeclaredFields();
        columns=new ArrayList<>();
        for (Field field : declaredFields) {
            String name = field.getName();
            columns.add(name);
        }
    }


}
